package com.zhoux.others;

/**
 * @author taoyi
 * @version 1.0
 * @date 2021/3/17 14:29
 *
 * 本类用于测试位运算符
 */
public class Bit_Operation {
    public static void main(String[] args) {
        swap(5,6);
    }

    public static void swap(int a, int b){
        if (a != b){
            a ^= b;
            b ^= a;
            a ^= b;
        }
        System.out.println("a="+a+",b="+b);
    }
}

